<template>
	<view>
		<navigation title="添加"></navigation>
		<view class="infoBox">
			<!--  婚宴增项-->
			<uni-collapse accordion="true" v-if="options.id=='banquetSuborder'">							
				<uni-collapse-item title="婚宴增项" class="title "  :open='true'>
					<view class="d3"  >
						<view class="info_box">
							<view class="name">
								<view class="name">婚宴增项</view>								
							</view>
							<view class="con">
								<text class="txt1">承办公司</text>
								<picker mode="selector" range-key="title" :range="companyList" data-type="suborder" @change="banquetCompanyListe">									
								    <input type="text"  v-model="banquetSuborderList.company_text" placeholder="请选择" />											
								</picker>
							</view>
							<view class="con">
								<text class="txt1">桌数</text>
								<input type="text"  v-model="banquetSuborderList.table_amount" placeholder="请输入" />																
							</view>	
							<view class="con">
								<text class="txt1">餐标</text>
								<input type="text"  v-model="banquetSuborderList.table_price" placeholder="请输入" />									
							</view>							
							<view class="con">
								<text class="txt1">增项小计</text>
								<input type="text"  v-model="banquetSuborderList.banquet_totals" placeholder="请输入" />																	
							</view>																				
							<view class="remark">
								<text class="txt1">备注</text>
								<textarea maxlength="-1" class="txt2" type="text"  v-model="banquetSuborderList.sub_banquet_remark" placeholder="请输入备注" />										
							</view>							
						</view>
					</view>
					
					<view class="info_box">
						<view class="con">
							<view class="txt1">收据编号</view>
					        <input type="text"  v-model="banquet_incomeList.receivable_no" placeholder="请输入" />																
						</view>		
						<view class="con">
							<text class="txt1">收款方式</text>		
							<picker mode="selector"  range-key="title" :range="incomePaymentList" @change="incomePaymentListFn"  >
								<input type="text" disabled="" v-model="banquet_incomeList.banquet_income_payment_text " placeholder="请选择" />																
							</picker>									
						</view>							
											
						<view class="con">
							<text class="txt1">收款时间</text>
							<timeSelector showType="yearToMinute"  @btnConfirm="income_date_moneyBtnConfirm" >
								   <input type="text" disabled="" v-model="banquet_incomeList.banquet_income_date" placeholder="请选择" />
							</timeSelector>										
						</view>							
						<view class="con">
							<text class="txt1">收款金额</text>
							<input type="text"  v-model="banquet_incomeList.banquet_income_item_price" placeholder="请输入" />								
						</view>
						<view class="remark">
							<text class="txt1">收款备注</text>
							<textarea maxlength="-1" class="txt2" type="text"  v-model="banquet_incomeList.income_remark" placeholder="请输入备注" />								
						</view>
					</view>
					
					<view class="approval">
						<text>审批流程</text>
						 <view class="approver">
							 <view class="box" v-for="(item,index) in confirmList" :key="index">
								 <view :class="index===0?'frist_circle':'circle'"></view>
								 <view class="left">
									 {{item.title}}
									 <view class="view_text">
									       {{item.status}}
									 </view>
									 <view class="view_text">
									       {{item.content}}						 							  							
									 </view>
								 </view>
								 <view class="right" v-for="(items,indexs) in item.managerList" :key="indexs">
									 <view class="image">
										<image style="width: 100%;border-radius: 50%;" :src="items.avatar" mode="widthFix"></image>						 	
									 </view>
									 <text>{{items.realname}}</text>
								 </view>	
							 </view>														 				
						 </view>
					</view>	
					
					<!-- 合同照片 -->
					<view class="line"></view>
					<view class="photo"  v-if="options.id=='banquetSuborder' || options.id=='weddingSuborder'">
						<text>合同照片</text>
						<view style="display: flex;justify-content: left;">
							<view class="addPic"  v-for="(item,index) in imageArray" :key="index">
								<image :src="item" mode="widthFix" ></image>
							    <uni-icons @click="deleteImageArray(index,'imageArray')" type="minus-filled" size="10" color="red" style="position: absolute;right:-30upx;top: 0;"></uni-icons>
							</view>
							<view class="addPic" @click="chooseImage('imageArray')">
								<image src="@/static/add.png" mode="" ></image>					
							</view>
						</view>			
					</view>
					<!--合同照片结束  -->
					
					<!-- 收据照片 -->
					<view class="line"></view>
					<view class="photo">
						<text>收据照片</text>
						<view style="display: flex;justify-content: left;">
							<view class="addPic"  v-for="(item,index) in receipt_imgArray" :key="index">
								<image :src="item" mode="widthFix" ></image>
							    <uni-icons @click="deleteImageArray(index,'receipt_imgArray')" type="minus-filled" size="10" color="red" style="position: absolute;right:-30upx;top: 0;"></uni-icons>
							</view>
							<view class="addPic" @click="chooseImage('receipt_imgArray')">
								<image src="@/static/add.png" mode="" ></image>					
							</view>
						</view>
						
					</view>
					<!-- 收据照片结束 -->
					
					<!-- 小票或收款截图照片 -->
					<view class="line"></view>
					<view class="photo">
						<text>小票或收款截图照片</text>
						<view style="display: flex;justify-content: left;">
							<view class="addPic"  v-for="(item,index) in note_img_imgArray" :key="index">
								<image :src="item" mode="widthFix" ></image>
								<uni-icons @click="deleteImageArray(index,'note_img_imgArray')" type="minus-filled" size="10" color="red" style="position: absolute;right:-30upx;top: 0;"></uni-icons>
							</view>
							<view class="addPic" @click="chooseImage('note_img_imgArray')">
								<image src="@/static/add.png" mode="" ></image>					
							</view>
					    </view>
					</view>
				</uni-collapse-item>							
			</uni-collapse>
			<!-- 婚庆增项 -->
			<uni-collapse accordion="true" v-if="options.id=='weddingSuborder'">							
			    <uni-collapse-item title="婚庆增项" class="title "  :open='true'>
			    	<view   >
			    		<view class="info_box">
			    			<view class="name">
			    				<view class="name">婚庆增项</view>								
			    			</view>
							<view class="con">								
								<text class="txt1">承办公司</text>
								<picker mode="selector" range-key="title" :range="companyList" data-type="suborder" @change="weddingCompanyListe">									
									<input type="text"  v-model="weddingSuborderList.company_text" placeholder="请选择" />											
								</picker>								
							</view>
			    			<view class="con">
			    				<text class="txt1">订单号</text>
			    				<input type="text"  v-model="weddingSuborderList.wedding_order_no" placeholder="请输入" />	
			    			</view>					
			    			<view class="con">
			    				<text class="txt1">增项小计</text>
			    				<input type="text"  v-model="weddingSuborderList.wedding_totals" placeholder="请输入" />											
			    			</view>							
			    															
			    			<view class="remark">
			    				<text class="txt1">备注</text>
			    				<textarea maxlength="-1" class="txt2" type="text"  v-model="weddingSuborderList.sub_wedding_remark" placeholder="请输入备注" />											
			    			</view>								
			    		</view>
						
						<view class="info_box">
							<view class="con">
								<view class="txt1">收据编号</view>	
							    <input type="text"  v-model="banquet_incomeList.receivable_no" placeholder="请输入" />																
							</view>		
							<view class="con">
								<text class="txt1">收款方式</text>		
								<picker mode="selector"  range-key="title" :range="incomePaymentList" @change="incomePaymentListFn"  >
									<input type="text" disabled="" v-model="banquet_incomeList.banquet_income_payment_text " placeholder="请选择" />																
								</picker>									
							</view>							
												
							<view class="con">
								<text class="txt1">收款时间</text>
								<timeSelector showType="yearToMinute"  @btnConfirm="income_date_moneyBtnConfirm" >
									   <input type="text" disabled="" v-model="banquet_incomeList.banquet_income_date" placeholder="请选择" />
								</timeSelector>										
							</view>
							<!-- <view class="con">
								<text class="txt1">实际收款时间</text>
								<timeSelector showType="yearToMinute"  @btnConfirm="income_real_date_moneyBtnConfirm" >
									   <input type="text" disabled="" v-model="banquet_incomeList.banquet_income_real_date" placeholder="请输入" />
								</timeSelector>									
							</view> -->
							<view class="remark">
								<text class="txt1">收款备注</text>
								<textarea maxlength="-1" class="txt2" type="text"  v-model="banquet_incomeList.income_remark" placeholder="请输入备注" />								
							</view>
						</view>
						
						<view class="approval">
							<text>审批流程</text>
							 <view class="approver">
								 <view class="box" v-for="(item,index) in confirmList" :key="index">
									 <view :class="index===0?'frist_circle':'circle'"></view>
									 <view class="left">
										 {{item.title}}
										 <view class="view_text">
										       {{item.status}}
										 </view>
										 <view class="view_text">
										       {{item.content}}						 							  							
										 </view>
									 </view>
									 <view class="right" v-for="(items,indexs) in item.managerList" :key="indexs">
										 <view class="image">
											<image style="width: 100%;border-radius: 50%;" :src="items.avatar" mode="widthFix"></image>						 	
										 </view>
										 <text>{{items.realname}}</text>
									 </view>	
								 </view>														 				
							 </view>
						</view>	
			    	</view>
					
					<!-- 合同照片 -->
					<view class="line"></view>
					<view class="photo"  v-if="options.id=='banquetSuborder' || options.id=='weddingSuborder'">
						<text>合同照片</text>
						<view style="display: flex;justify-content: left;">
							<view class="addPic"  v-for="(item,index) in imageArray" :key="index">
								<image :src="item" mode="widthFix" ></image>
							    <uni-icons @click="deleteImageArray(index,'imageArray')" type="minus-filled" size="10" color="red" style="position: absolute;right:-30upx;top: 0;"></uni-icons>
							</view>
							<view class="addPic" @click="chooseImage('imageArray')">
								<image src="@/static/add.png" mode="" ></image>					
							</view>
						</view>			
					</view>
					<!--合同照片结束  -->
					
					<!-- 收据照片 -->
					<view class="line"></view>
					<view class="photo">
						<text>收据照片</text>
						<view style="display: flex;justify-content: left;">
							<view class="addPic"  v-for="(item,index) in receipt_imgArray" :key="index">
								<image :src="item" mode="widthFix" ></image>
							    <uni-icons @click="deleteImageArray(index,'receipt_imgArray')" type="minus-filled" size="10" color="red" style="position: absolute;right:-30upx;top: 0;"></uni-icons>
							</view>
							<view class="addPic" @click="chooseImage('receipt_imgArray')">
								<image src="@/static/add.png" mode="" ></image>					
							</view>
						</view>
						
					</view>
					<!-- 收据照片结束 -->
					
					<!-- 小票或收款截图照片 -->
					<view class="line"></view>
					<view class="photo">
						<text>小票或收款截图照片</text>
						<view style="display: flex;justify-content: left;">
							<view class="addPic"  v-for="(item,index) in note_img_imgArray" :key="index">
								<image :src="item" mode="widthFix" ></image>
								<uni-icons @click="deleteImageArray(index,'note_img_imgArray')" type="minus-filled" size="10" color="red" style="position: absolute;right:-30upx;top: 0;"></uni-icons>
							</view>
							<view class="addPic" @click="chooseImage('note_img_imgArray')">
								<image src="@/static/add.png" mode="" ></image>					
							</view>
					    </view>
					</view>
			    </uni-collapse-item>													
			</uni-collapse>
			<!-- 收款/付款 -->
			<uni-collapse accordion="true">			  											
				<uni-collapse-item title="收款信息" class="title " v-if="options.id=='income'" :open="true">
					<view class="d3"  >
						<view class="info_box">
							<view class="con">
								<view class="name">收据编号</view>
								<input type="text"  v-model="banquet_incomeList.receivable_no" placeholder="请输入" />																
							</view>		
							<view class="con">
								<text class="txt1">收款方式</text>		
								<picker mode="selector"  range-key="title" :range="incomePaymentList" @change="incomePaymentListFn"  >
									<input type="text" disabled="" v-model="banquet_incomeList.banquet_income_payment_text " placeholder="请选择" />																
								</picker>									
							</view>							
							<view class="con">
								<text class="txt1">收款性质</text>		
								<picker mode="selector"  range-key="title" :range="incomeTypeList" @change="income_type_textFn"  >
									<input type="text" disabled="" v-model="banquet_incomeList.banquet_income_type_text " placeholder="请选择" />																
								</picker>									
							</view>							
							<view class="con">
								<text class="txt1">收款时间</text>
								<timeSelector showType="yearToMinute"  @btnConfirm="income_date_moneyBtnConfirm" >
									   <input type="text" disabled="" v-model="banquet_incomeList.banquet_income_date" placeholder="请选择" />
								</timeSelector>										
							</view>
							<!-- <view class="con">
								<text class="txt1">实际收款时间</text>
								<timeSelector showType="yearToMinute"  @btnConfirm="income_real_date_moneyBtnConfirm" >
									   <input type="text" disabled="" v-model="banquet_incomeList.banquet_income_real_date" placeholder="请输入" />
								</timeSelector>									
							</view> -->
							<view class="con">
								<text class="txt1">收款金额</text>
								<input type="text"  v-model="banquet_incomeList.banquet_income_item_price" placeholder="请输入" />								
							</view>
							<view class="remark">
								<text class="txt1">收款备注</text>
								<textarea maxlength="-1" class="txt2" type="text"  v-model="banquet_incomeList.income_remark" placeholder="请输入备注" />								
							</view>
						</view>
					</view>
					<!-- 收据照片 -->
					<view class="line"></view>
					<view class="photo">
						<text>收据照片</text>
						<view style="display: flex;justify-content: left;">
							<view class="addPic"  v-for="(item,index) in receipt_imgArray" :key="index">
								<image :src="item" mode="widthFix" ></image>
							    <uni-icons @click="deleteImageArray(index,'receipt_imgArray')" type="minus-filled" size="10" color="red" style="position: absolute;right:-30upx;top: 0;"></uni-icons>
							</view>
							<view class="addPic" @click="chooseImage('receipt_imgArray')">
								<image src="@/static/add.png" mode="" ></image>					
							</view>
						</view>
						
					</view>
					<!-- 收据照片结束 -->
					
					<!-- 小票或收款截图照片 -->
					<view class="line"></view>
					<view class="photo">
						<text>小票或收款截图照片</text>
						<view style="display: flex;justify-content: left;">
							<view class="addPic"  v-for="(item,index) in note_img_imgArray" :key="index">
								<image :src="item" mode="widthFix" ></image>
								<uni-icons @click="deleteImageArray(index,'note_img_imgArray')" type="minus-filled" size="10" color="red" style="position: absolute;right:-30upx;top: 0;"></uni-icons>
							</view>
							<view class="addPic" @click="chooseImage('note_img_imgArray')">
								<image src="@/static/add.png" mode="" ></image>					
							</view>
					    </view>
					</view>
					
					<view class="approval" v-if="JSON.stringify(confirmList.managerList)!='[]'">
						<text>审批流程</text>
						 <view class="approver">
							 <view class="box" v-for="(item,index) in confirmList" :key="index">
								 <view :class="index===0?'frist_circle':'circle'"></view>
								 <view class="left">
									 {{item.title}}
									 <view class="view_text">
									       {{item.status}}
									 </view>
									 <view class="view_text">
									       {{item.content}}						 							  							
									 </view>
								 </view>
								 <view class="right" v-for="(items,indexs) in item.managerList" :key="indexs">
									 <view class="image">
										<image style="width: 100%;border-radius: 50%;" :src="items.avatar" mode="widthFix"></image>						 	
									 </view>
									 <text>{{items.realname}}</text>
								 </view>	
							 </view>														 				
						 </view>
					</view>			
				</uni-collapse-item>
				<uni-collapse-item title="付款信息" class="title " v-if="options.id=='payment'" :open='true'>
					<view class="d3"  >
						<view class="info_box">
							<view class="con">
								<text class="txt1">付款编号</text>
								<input type="text"  v-model="paymentList.payment_no" placeholder="请输入" />							
							</view>
							<!-- <view class="con">
								<text class="txt1">付款类目</text>
								<text class="txt2">{{paymentList.pay_category}}</text>
							</view>	 -->				
							<view class="con">
								<text class="txt1">付款性质</text>
								<picker mode="selector"  range-key="title" :range="incomeTypeList" @change="payTypeListFn"  data-type="order">
									<input type="text" disabled="" v-model="paymentList.pay_type_text " placeholder="请选择" />																
								</picker>							
							</view>							
							<view class="con">
								<text class="txt1">付款申请日期</text>
								<timeSelector showType="yearToMinute"  @btnConfirm="apply_pay_dateFn" >
									   <input type="text" disabled="" v-model="paymentList.apply_pay_date" placeholder="请选择" />
								</timeSelector>										
							</view>							
							<!-- <view class="con">
								<text class="txt1">实际付款日期</text>
								<timeSelector showType="yearToMinute"  @btnConfirm="pay_real_dateFn" >
									   <input type="text" disabled="" v-model="paymentList.pay_real_date" placeholder="请输入" />
								</timeSelector>										
							</view> -->
							<view class="con">
								<text class="txt1">付款金额</text>
								<input type="text"  v-model="paymentList.pay_item_price" placeholder="请输入" />								
							</view>							
							<view class="con">
								<text class="txt1">收款酒店</text>								
								<input type="text"  v-model="paymentList.pay_to_company" placeholder="请输入酒店名" />																																
							</view>
							<view class="con">
								<text class="txt1">收款账号</text>
								<input type="text"  v-model="paymentList.pay_to_account" placeholder="请输入" />								
							</view>
							<view class="con">
								<text class="txt1">开户行</text>
								<input type="text"  v-model="paymentList.pay_to_bank" placeholder="请输入" />								
							</view>
							<view class="remark">
								<text class="txt1">备注</text>
								<textarea maxlength="-1" class="txt2" type="text"  v-model="paymentList.payment_remark" placeholder="请输入备注" />							
							</view>
						</view>
					</view>
					<!-- 收据照片 -->
					<view class="line"></view>
					<view class="photo">
						<text>收据照片</text>
						<view style="display: flex;justify-content: left;">
							<view class="addPic"  v-for="(item,index) in receipt_imgArray" :key="index">
								<image :src="item" mode="widthFix" ></image>
							    <uni-icons @click="deleteImageArray(index,'receipt_imgArray')" type="minus-filled" size="10" color="red" style="position: absolute;right:-30upx;top: 0;"></uni-icons>
							</view>
							<view class="addPic" @click="chooseImage('receipt_imgArray')">
								<image src="../../../static/add.png" mode="" ></image>					
							</view>
						</view>
						
					</view>
					<!-- 收据照片结束 -->
					
					<!-- 小票或收款截图照片 -->
					<view class="line"></view>
					<view class="photo">
						<text>小票或收款截图照片</text>
						<view style="display: flex;justify-content: left;">
							<view class="addPic"  v-for="(item,index) in note_img_imgArray" :key="index">
								<image :src="item" mode="widthFix" ></image>
								<uni-icons @click="deleteImageArray(index,'note_img_imgArray')" type="minus-filled" size="10" color="red" style="position: absolute;right:-30upx;top: 0;"></uni-icons>
							</view>
							<view class="addPic" @click="chooseImage('note_img_imgArray')">
								<image src="../../../static/add.png" mode="" ></image>					
							</view>
					    </view>
					</view>
					<view class="approval" v-if="JSON.stringify(confirmList.managerList)!='[]'">
						<text>审批流程</text>
						 <view class="approver">
							 <view class="box" v-for="(item,index) in confirmList" :key="index">
								 <view :class="index===0?'frist_circle':'circle'"></view>
								 <view class="left">
									 {{item.title}}
									 <view class="view_text">
									       {{item.status}}
									 </view>
									 <view class="view_text">
									       {{item.content}}						 							  							
									 </view>
								 </view>
								 <view class="right" v-for="(items,indexs) in item.managerList" :key="indexs">
									 <view class="image">
										<image style="width: 100%;border-radius: 50%;" :src="items.avatar" mode="widthFix"></image>						 	
									 </view>
									 <text>{{items.realname}}</text>
								 </view>	
							 </view>														 				
						 </view>
					</view>	
				</uni-collapse-item>																																	
			</uni-collapse> 			
			<!-- 酒店协议 -->
			<uni-collapse accordion="true">				
			</uni-collapse>
			<!-- 酒店服务项目-->
			<uni-collapse accordion="true" v-if="options.id=='hotelItem'">	
				<uni-collapse-item title="酒店服务项目"  :open="true" class="title ">
					<view class="hotelService"  >
						<view class="title">
							<text class="name">酒店服务项目</text>							
						</view>
						<view class="content">
							<view class="box">
								<text>婚房数量</text>
								<input type="digit" v-model="hotelItem.wedding_room_amount"  placeholder="请输入" placeholder-style="color:#999999;" />
							</view>
							<view class="box">
								<text>婚房价格</text> 
								<input type="digit" v-model="hotelItem.wedding_room"  placeholder="请输入" placeholder-style="color:#999999;" />
							</view>
							<view class="box">
								<text>停车位数量</text>
								<input type="digit" v-model="hotelItem.part_amount"  placeholder="请输入" placeholder-style="color:#999999;" />
							</view>
							<view class="box">
								<text>停车位价格</text>
								<input type="digit" v-model="hotelItem.part"  placeholder="请输入" placeholder-style="color:#999999;" />
							</view>
							<view class="box">
								<text>香槟数量</text>
								<input type="digit" v-model="hotelItem.champagne_amount"  placeholder="请输入" placeholder-style="color:#999999;" />
							</view>
							<view class="box">
								<text>香槟价格</text>
								<input type="digit" v-model="hotelItem.champagne"  placeholder="请输入" placeholder-style="color:#999999;" />
							</view>
							<view class="box">
								<text>茶歇数量</text>
								<input type="digit" v-model="hotelItem.tea_amount"  placeholder="请输入" placeholder-style="color:#999999;" />
							</view>
							<view class="box">
								<text>茶歇价格</text>
								<input type="digit" v-model="hotelItem.tea"  placeholder="请输入" placeholder-style="color:#999999;" />
							</view>
							<view class="box">
								<text>蛋糕数量</text>
								<input type="digit" v-model="hotelItem.cake_amount"  placeholder="请输入" placeholder-style="color:#999999;" />
							</view>
							<view class="box">
								<text>蛋糕价格</text>
								<input type="digit" v-model="hotelItem.cake"  placeholder="请输入" placeholder-style="color:#999999;" />
							</view>
							
						</view>
					</view>
				</uni-collapse-item>				
			</uni-collapse>
			<!-- 婚宴 -->
			<uni-collapse accordion="true" v-if="options.id=='banquet'">
				<uni-collapse-item title="婚宴" :open="true" class="title ">
					<view class="hotelService"  >
						<view class="title">
							<text class="name">婚宴基本信息</text>							
						</view>
						<view class="content">
							<view class="box">
								<text>订单所属公司</text>							
								<picker @change="chooseBanquet"  range-key="title" :range="companyList">
								    <view class="choose" style="margin-top: 25upx;" v-if="companyList.length>1">
										 <text :class="Banquet_companyIndex!==''?'active':''">{{Banquet_companyIndex===''?'请选择':companyList[Banquet_companyIndex].title}}</text>
										 <image v-if="Banquet_companyIndex===''" src="../../../static/images/right.png" mode=""></image>
								    </view>
								</picker>
								<icon v-if="Banquet_companyIndex!==''" type="clear" size="22upx" style="position: absolute;right: 40upx;margin-top: 5upx;" @click="deleteCompany"></icon>
							</view>
							<view class="box">
								<text>婚宴总金额</text>
								<input type="digit" v-model="banquet.banquet_totals"  placeholder="请输入" placeholder-style="color:#999999;" />
							</view>
							<view class="box">
								<text>桌数</text>
								<input type="digit" v-model="banquet.table_amount"  placeholder="请输入" placeholder-style="color:#999999;" />
							</view>
							<view class="box">
								<text>餐标</text>
								<input type="digit" v-model="banquet.table_price"  placeholder="请输入" placeholder-style="color:#999999;" />
							</view>
							<view class="box">
								<text>服务费总计</text>
								<input type="digit" v-model="banquet.service_fee"  placeholder="请输入" placeholder-style="color:#999999;" />
							</view>
							<view class="box">
								<text>酒水费用</text>
								<input type="digit" v-model="banquet.wine_fee"  placeholder="请输入" placeholder-style="color:#999999;" />
							</view>
							<view class="box">
								<text>加菜换菜</text>
								<input type="digit" v-model="banquet.banquet_update_table"  placeholder="请输入" placeholder-style="color:#999999;" />
							</view>
							<view class="box">
								<text>选择仪式</text>
								<picker @change="chooseRite"  range-key="title" :range="ritualList">
								    <view class="choose" style="margin-top: 25upx;">
										 <text :class="riteIndex!==''?'active':''">{{riteIndex===''?'请选择':banquet.banquet_ritual_text}}</text>
										 <image v-if="riteIndex===''" src="../../../static/images/right.png" mode=""></image>
								    </view>
									
								</picker>
								<icon v-if="riteIndex!==''" type="clear" size="22upx" style="position: absolute;right: 40upx;margin-top: 5upx;" @click="deleteRite"></icon>
							</view>
							<view class="box">
								<text>仪式价格</text>
								<input type="digit" v-model="banquet.banquet_ritual_hall"  placeholder="请输入" placeholder-style="color:#999999;" />
							</view>
							<view class="box">
								<text>其他</text>
								<input type="text" v-model="banquet.banquet_other"  placeholder="请输入" placeholder-style="color:#999999;" />
							</view>
							<view class="remark">
								<text>备注</text>
								<textarea type="text" v-model="banquet.banquet_remark" placeholder="请输入备注" placeholder-style="color:#999999;" />
							</view>
						</view>
					</view>
				</uni-collapse-item>
			</uni-collapse>
			<!-- 婚庆 -->
			<uni-collapse accordion="true" v-if="options.id=='wedding'">
				<uni-collapse-item title="婚庆基本信息" :open="true" class="title ">
					<view class="hotelService" >
						<view class="title">
							<text class="name">婚庆基本信息</text>							
						</view>
						<view class="content">					
							<view class="box">
								<text>订单所属公司</text>						
								<picker @change="chooseWedding"  range-key="title" :range="companyList">
								    <view class="choose" style="margin-top: 25upx;" v-if="companyList.length>1">
										 <text :class="wedding_companyIndex!==''?'active':''">{{wedding_companyIndex===''?'请选择':companyList[wedding_companyIndex].title}}</text>
										 <image v-if="wedding_companyIndex===''" src="../../../static/images/right.png" mode=""></image>
								    </view>
								</picker>
								<icon v-if="wedding_companyIndex!==''"  type="clear" size="22upx" style="position: absolute;right: 40upx;margin-top: 5upx;" @click="deleteCompany"></icon>
							</view>
							<view class="box">
								<text>婚庆总金额</text>
								<input type="digit" v-model="wedding.wedding_total"  placeholder="请输入" placeholder-style="color:#999999;" />
							</view>
							<view class="box">
								<text>选择套餐</text>
								<picker @change="chooseCombo"    range-key="title" :range="packageList">
								    <view class="choose" style="margin-top: 25upx;" v-if="packageList.length>1">
										 <text :class="comboIndex!==''?'active':''">{{comboIndex===''?'请选择':wedding.wedding_package_text}}</text>
										 <image v-if="comboIndex===''" src="../../../static/images/right.png" mode=""></image>
								    </view>
								</picker>
								<icon v-if="comboIndex!==''" type="clear" size="22upx" style="position: absolute;right: 40upx;margin-top: 5upx;" @click="deleteCombo"></icon>
							</view>
							<view class="box">
								<text>婚庆套餐价</text>
								<input type="digit" v-model="wedding.wedding_package_price"  placeholder="请输入" placeholder-style="color:#999999;" />
							</view>
							<view class="box">
								<text>选择仪式</text>
								<picker @change="chooseCeremony"  range-key="title" :range="ritualList">
								    <view class="choose" style="margin-top: 25upx;"  v-if="ritualList.length>1">
										 <text :class="ceremonyIndex!==''?'active':''">{{ceremonyIndex===''?"请选择":wedding.wedding_ritual_text}}</text>
										 <image v-if="ceremonyIndex===''" src="../../../static/images/right.png" mode=""></image>
							    </view>	
								</picker>
								<icon v-if="ceremonyIndex!==''" type="clear" size="22upx" style="position: absolute;right: 40upx;margin-top: 5upx;" @click="deleteCeremony"></icon>
							</view>
							<view class="box">
								<text>仪式价格</text>
								<input type="digit" v-model="wedding.wedding_ritual_hall"  placeholder="请输入" placeholder-style="color:#999999;" />
							</view>
							<view class="box">
								<text>其他</text>
								<input type="text" v-model="wedding.wedding_other"  placeholder="请输入" placeholder-style="color:#999999;" />
							</view>
							<view class="box">
								<text>是否研发产品</text>
								<picker @change="chooseResearch"  :value="researchIndex" :range="researchType">
								    <view class="choose" style="margin-top: 25upx;">
										 <text :class="researchIndex!==0?'active':''">{{researchType[researchIndex]}}</text>
										 <image v-if="researchIndex===0" src="../../../static/images/right.png" mode=""></image>
								    </view>
								</picker>
								<icon v-if='researchIndex!==0' type="clear" size="22upx" style="position: absolute;right: 40upx;margin-top: 5upx;" @click="deleteResearch"></icon>
							</view>
							<view class="box">
								<text>研发产品编号</text>
								<input type="text" v-model="wedding.new_product_no"  placeholder="请输入" placeholder-style="color:#999999;" />
							</view>
							<view class="remark">
								<text>备注</text>
								<textarea type="text" v-model="wedding.wedding_remark" placeholder="请输入备注" placeholder-style="color:#999999;" />
							</view>
						</view>
					</view>
				</uni-collapse-item>
			</uni-collapse>
			<!-- 婚车 -->
			<uni-collapse accordion="true" v-if="options.id=='car'">
				<uni-collapse-item title="婚车" :open="true" class="title ">
					<view class="hotelService"  v-if='item==3'>
						<view>
							<view class="title">
								<text class="name">婚车</text>
								<text class="delete"  @click="deletePro(index)">删除</text>
							</view>
							<view class="content">
								<view class="box">
									<text>承办公司</text>
									<picker @change="chooseCarCompany" range-key="title" :range="companyList">
										<view class="choose" style="margin-top: 25upx;" v-if="companyList.length>1">
											<text :class="Car_companyIndex!==''?'active':''">{{Car_companyIndex===''?'请选择':companyList[Car_companyIndex].title}}</text>
											<image v-if="Car_companyIndex===''" src="../../../static/images/right.png" mode=""></image>
										</view>
									</picker>
									<icon v-if="Car_companyIndex!==''" type="clear" size="22upx" style="position: absolute;right: 20upx;margin-top: 5upx;"
									 @click="deleteCar_Company"></icon>
									 
									
								</view>
								<view class="box">
									<!-- master_car_id -->
									<text>主车型号</text>
									<picker @change="chooseCar"  range-key="title" :range="carList">
									    <view class="choose" style="margin-top: 25upx;" v-if="carList.length>1">
											 <text :class="carIndex!==''?'active':''">{{carIndex===''?'请选择':car.master_car_text}}</text>
											 <image v-if="carIndex===''" src="../../../static/images/right.png" mode=""></image>
									    </view>
									</picker>
									<icon v-if="carIndex!==''"  type="clear" size="22upx" style="position: absolute;right: 40upx;margin-top: 5upx;" @click="deleteCar"></icon>
								</view>
								<view class="box">
									<text>主车数量</text>
									<input type="digit" v-model="car.master_car_amount"  placeholder="请输入" placeholder-style="color:#999999;" />
								</view>
								<view class="box">
									<text>主车费用</text>
									<input type="digit" v-model="car.master_car_price"  placeholder="请输入" placeholder-style="color:#999999;" />
								</view>
								<view class="box">
									<!-- slave_car_id -->
									<text>跟车型号</text>
									<picker @change="chooseFollowCar"   range-key="title" :range="carList">
									    <view class="choose" style="margin-top: 25upx;" v-if="carList.length>1">
											 <text :class="followCarIndex!==''?'active':''">{{followCarIndex===''?"请选择":car.slave_car_text}}</text>
											 <image v-if="followCarIndex===''" src="../../../static/images/right.png" mode=""></image>
									    </view>
									</picker>
									<icon v-if="followCarIndex!==''"  type="clear" size="22upx" style="position: absolute;right: 40upx;margin-top: 5upx;" @click="deleteFollowCar"></icon>
								</view>
								<view class="box">
									<text>跟车数量</text>
									<input type="digit" v-model="car.slave_car_amount"  placeholder="请输入" placeholder-style="color:#999999;" />
								</view>
								<view class="box">
									<text>跟车费用</text>
									<input type="digit" v-model="car.slave_car_price"  placeholder="请输入" placeholder-style="color:#999999;" />
								</view>
								<view class="box">
									<text>婚车服务时长</text>
									<input type="digit" v-model="car.service_hour"  placeholder="请输入" placeholder-style="color:#999999;" />
								</view>
								<view class="box">
									<text>婚车服务距离</text>
									<input type="digit" v-model="car.service_distance"  placeholder="请输入" placeholder-style="color:#999999;" />
								</view>
								<view class="remark">
									<text>备注</text>
									<textarea type="text" v-model="car.car_remark" placeholder="请输入备注" placeholder-style="color:#999999;" />
								</view>
							</view>
						</view>				
					</view>
				</uni-collapse-item>
		    </uni-collapse>
			
			
			<!-- 酒水 -->
			<uni-collapse accordion="true" v-if="options.id=='wine'">
				<uni-collapse-item title="酒水" :open="true" class="title ">
					<view class="hotelService" v-if="item==5">
						<view v-for="(itemW,indexW) in wine" :key="indexW">
							<view class="title">
								<text class="name">酒水信息({{indexW+1}})</text>
								<text class="delete" @click="deleteWine(indexW)">删除</text>
							</view>
							<view class="content">
								
								<!-- wine_id -->
								<view class="box">
									<text>品牌</text>
									<picker @change="chooseWine"  :data-type="indexW" range-key="title" :range="wineList">
									    <view class="choose" style="margin-top: 25upx;" v-if="JSON.stringify(wineList)!='[]'">
											 <text :class="itemW.wineIndex!==''?'active':''">{{itemW.wineIndex===''?'请选择':wine[indexW].wine_text}}</text>
											 <image v-if="itemW.wineIndex===''" src="../../../static/images/right.png" mode=""></image>
									    </view>
									</picker>
									<icon v-if="itemW.wineIndex!==''" type="clear" size="22upx" style="position: absolute;right: 40upx;margin-top: 5upx;" @click="deleteJiu(indexW)"></icon>
								</view>
								<view class="box">
									<text>数量</text>
									<input type="digit" v-model="itemW.wine_amount"  placeholder="请输入" placeholder-style="color:#999999;" />
								</view>
								<view class="box">
									<text>金额</text>
									<input type="digit" v-model="itemW.wine_price"  placeholder="请输入" placeholder-style="color:#999999;" />
								</view>
								<view class="remark">
									<text>备注</text>
									<textarea type="text" v-model="itemW.wine_remark" placeholder="请输入备注" placeholder-style="color:#999999;" />
								</view>
							</view>
						</view>
						<view class="addDetail" @click="addWine">
							增加明细
						</view>
					</view>
				</uni-collapse-item>
			</uni-collapse>

			<!-- 喜糖 -->
			<uni-collapse accordion="true" v-if="options.id=='sugar'">
				<uni-collapse-item title="喜糖" :open="true" class="title ">
					<view class="hotelService" v-if="item==4">
						<view v-for="(items,indexs) in sugar" :key="indexs">
							<view class="title">
								<text class="name">喜糖信息({{indexs+1}})</text>
								<text class="delete" @click="deleteSuger(indexs)">删除</text>
							</view>
							<view class="content">
								<!-- sugar_id -->
								<view class="box">
									<text>品牌</text>
									<picker @change="chooseSuger" :data-type="indexs"  range-key="title" :range="sugarList">
									    <view class="choose" style="margin-top: 25upx;" v-if="JSON.stringify(sugarList)!='[]'" >
											 <text :class="items.sugerIndex!==''?'active':''">{{items.sugerIndex===''?'请选择':sugar[indexs].sugar_text}}</text>
											 <image v-if="items.sugerIndex===''" src="../../../static/images/right.png" mode=""></image>
									    </view>
									</picker>
									<icon v-if="items.sugerIndex!==''"  type="clear" size="22upx" style="position: absolute;right: 40upx;margin-top: 5upx;" @click="deleteTang(indexs)"></icon>
								</view>
								<view class="box">
									<text>数量</text>
									<input type="digit" v-model="items.sugar_amount"  placeholder="请输入" placeholder-style="color:#999999;" />
								</view>
								<view class="box">
									<text>金额</text>
									<input type="digit" v-model="items.sugar_price"  placeholder="请输入" placeholder-style="color:#999999;" />
								</view>
								<view class="remark">
									<text>备注</text>
									<textarea type="text" v-model="items.sugar_remark" placeholder="请输入备注" placeholder-style="color:#999999;" />
								</view>
							</view>
						</view>
						<view class="addDetail" @click="dessertFn">
							增加明细
						</view>
					</view>
				</uni-collapse-item>
			</uni-collapse>

			<!-- 糕点 -->
			<uni-collapse accordion="true" v-if="options.id=='dessert'">
				<uni-collapse-item title="糕点" :open="true" class="title ">
					<view class="hotelService" v-if="item==6">
						<view v-for="(itemD,indexD) in dessert" :key="indexD">
							<view class="title">
								<text class="name">点心信息({{indexD+1}})</text>
								<text class="delete" @click="deleteDessert(indexD)">删除</text>
							</view>
							<view class="content">
								<!-- dessert_id -->
								<view class="box">
									<text>品牌</text>
									<picker @change="chooseDessert"  :data-type="indexD"  range-key="title" :range="dessertList">
									    <view class="choose" style="margin-top: 25upx;" v-if="JSON.stringify(dessertList)!='[]'">
											 <text :class="itemD.dessertIndex!==''?'active':''">{{itemD.dessertIndex===''?'请选择':dessert[indexD].dessert_text}}</text>
											 <image v-if="itemD.dessertIndex===''" src="../../../static/images/right.png" mode=""></image>
									    </view>
									</picker>
									<icon v-if="itemD.dessertIndex!==''"  type="clear" size="22upx" style="position: absolute;right: 40upx;margin-top: 5upx;" @click="deleteDian(indexD)"></icon>
								</view>
								<view class="box">
									<text>数量</text>
									<input type="digit" v-model="itemD.dessert_amount"  placeholder="请输入" placeholder-style="color:#999999;" />
								</view>
								<view class="box">
									<text>金额</text>
									<input type="digit" v-model="itemD.dessert_price"  placeholder="请输入" placeholder-style="color:#999999;" />
								</view>
								<view class="remark">
									<text>备注</text>
									<textarea type="text" v-model="itemD.dessert_remark" placeholder="请输入备注" placeholder-style="color:#999999;" />
								</view>
							</view>
						</view>
						<view class="addDetail" @click="addDessert">
							增加明细
						</view>
					</view>
				</uni-collapse-item>
			</uni-collapse>

			<!-- 灯光 -->
			<uni-collapse accordion="true" v-if="options.id=='light'">
				<uni-collapse-item title="灯光" :open="true" class="title ">
					<view class="hotelService" v-if="item==8">
						<view v-for="(itemT,indexT) in light" :key="indexT">
							<view class="title">
								<text class="name">灯光信息({{indexT+1}})</text>
								<text class="delete" @click="deleteLight(indexT)">删除</text>
							</view>
							<view class="content">
								<!-- light_id -->
								<view class="box">
									<text>品牌</text>
									<picker @change="chooseLight"  :data-type="indexT"  range-key="title" :range="lightList">
										<view class="choose" style="margin-top: 25upx;" v-if="JSON.stringify(lightList)!='[]'">
											 <text :class="itemT.lightIndex!==''?'active':''">{{itemT.lightIndex===''?'请选择':light[indexT].light_text}}</text>
											 <image v-if="itemT.lightIndex===''" src="../../../static/images/right.png" mode=""></image>
										</view>
									</picker>
									<icon v-if="itemT.lightIndex!==''"  type="clear" size="22upx" style="position: absolute;right: 40upx;margin-top: 5upx;" @click="deleteLightChoose(indexT)"></icon>
								</view>
								<view class="box">
									<text>数量</text>
									<input type="digit" v-model="itemT.light_amount"  placeholder="请输入" placeholder-style="color:#999999;" />
								</view>
								<view class="box">
									<text>金额</text>
									<input type="digit" v-model="itemT.light_price"  placeholder="请输入" placeholder-style="color:#999999;" />
								</view>
								<view class="remark">
									<text>备注</text>
									<textarea type="text" v-model="itemT.light_remark" placeholder="请输入备注" placeholder-style="color:#999999;" />
								</view>
							</view>
						</view>
						<view class="addDetail" @click="addLight">
							增加明细
						</view>
					</view>
				</uni-collapse-item>
			</uni-collapse>

			<!-- led -->
			<uni-collapse accordion="true" v-if="options.id=='led'">
				<uni-collapse-item title="Led" :open="true" class="title ">
					<view class="hotelService" v-if="item==7">
						<view v-for="(itemL,indexL) in led" :key="indexL">
							<view class="title">
								<text class="name">LED信息({{indexL+1}})</text>
								<text class="delete" @click="deleteLED(indexL)">删除</text>
							</view>
							<view class="content">
								<!-- led_id -->
								<view class="box">
									<text>品牌</text>
									<picker @change="chooseLED"  :data-type="indexL" range-key="title" :range="ledList">
										<view class="choose" style="margin-top: 25upx;" v-if="JSON.stringify(ledList)!='[]'">
											 <text :class="itemL.ledIndex!==''?'active':''">{{itemL.ledIndex===''?'请选择':led[indexL].led_text}}</text>
											 <image v-if="itemL.ledIndex===''" src="../../../static/images/right.png" mode=""></image>
										</view>
									</picker>
									<icon v-if="itemL.ledIndex!==''" type="clear" size="22upx" style="position: absolute;right: 40upx;margin-top: 5upx;" @click="deleteLedChoose(indexL)"></icon>
								</view>
								<view class="box">
									<text>数量</text>
									<input type="digit" v-model="itemL.led_amount"  placeholder="请输入" placeholder-style="color:#999999;" />
								</view>
								<view class="box">
									<text>金额</text>
									<input type="digit" v-model="itemL.led_price"  placeholder="请输入" placeholder-style="color:#999999;" />
								</view>
								<view class="remark">
									<text>备注</text>
									<textarea type="text" v-model="itemL.led_remark" placeholder="请输入备注" placeholder-style="color:#999999;" />
								</view>
							</view>
						</view>
						<view class="addDetail" @click="addLED">
							增加明细
						</view>
					</view>
				</uni-collapse-item>
			</uni-collapse>

			<!-- 3d -->
			<uni-collapse accordion="true" v-if="options.id=='3d'">
				<uni-collapse-item title="3D" :open="true" class="title ">
					<view class="hotelService" v-if="item==9">
						<view v-for="(itemF,indexF) in d3" :key="indexF">
							<view class="title">
								<text class="name">3D业务({{indexF+1}})</text>
								<text class="delete" @click="deleteF(indexF)">删除</text>
							</view>
							<view class="content">
								<!-- d3_id -->
								<view class="box">
									<text>品牌</text>
								<picker @change="chooseThree"  :data-type="indexF" range-key="title" :range="d3List">
									<view class="choose" style="margin-top: 25upx;" v-if="JSON.stringify(d3List)!='[]'">
										 <text :class="itemF.threeIndex!==''?'active':''">{{itemF.threeIndex===''?'请选择':d3[indexF].d3_text}}</text>
										 <image v-if="itemF.threeIndex===''" src="../../../static/images/right.png" mode=""></image>
									</view>
								</picker>
								<icon v-if="itemF.threeIndex!==''"  type="clear" size="22upx" style="position: absolute;right: 40upx;margin-top: 5upx;" @click="deleteThree(indexF)"></icon>
								</view>
								<view class="box">
									<text>数量</text>
									<input type="digit" v-model="itemF.d3_amount"  placeholder="请输入" placeholder-style="color:#999999;" />
								</view>
								<view class="box">
									<text>金额</text>
									<input type="digit" v-model="itemF.d3_price"  placeholder="请输入" placeholder-style="color:#999999;" />
								</view>
								<view class="remark">
									<text>备注</text>
									<textarea type="text" v-model="itemF.d3_remark" placeholder="请输入备注" placeholder-style="color:#999999;" />
								</view>
							</view>
						</view>
						<view class="addDetail" @click="addF">
							增加明细
						</view>
					</view>
				</uni-collapse-item>
			</uni-collapse>
			
		</view>
		
		<!-- 审批流程结束 -->
		<button type="default" class="btn" @click="saveFn()"> 保存</button>
	</view>
</template>

<script>
	import selectBox from "@/component/selectBox.vue"
	import timeSelector from '@/component/wing-time-selector/wing-time-selector.vue';
	import navigation from "@/component/navigation.vue"
	import sun from '@/utils/sun.js'
	export default {
		components: {
			navigation,
			timeSelector,
			selectBox
		},
		data() {
			return {
				selectBox:'',
				options:'',
				member:"",//客人信息
				order:'',//合同详情
				hotelItem:{
					wedding_room_amount:"",//婚房数量
					wedding_room:'',//婚房价格
					part_amount:'',//停车数量
					part:"",//停车价格
					champagne_amount:'',//香槟数量
					champagne:'',//香槟价格
					tea_amount:'',//茶歇数量
					tea:'',//茶歇价格
					cake_amount:"",//蛋糕数量
					cake:'',//蛋糕价格
				}, //酒店详情
				car:{
				  master_car_amount:"",//数量
				  master_car_price:"",//费用
				  slave_car_amount:"",//跟车数量
				  slave_car_price:"",//跟车费用
				  service_hour:"",//服务时长
				  service_distance:"",//服务距离
				  master_car_id:'',//主车
				  master_car_text:'',//主车
				  slave_car_text:'',//跟车
				  slave_car_id:'',//跟车
				  car_remark:"",//备注
				}, // 婚车
				wine: [
					{   
						wine_text:'',
						wine_id:'',
						wine_amount:"",//数量
						wine_price:"",//金额
						wine_remark:"",//备注
						wineIndex:''
					}
				], // 酒水
				sugar: [
					{   sugar_text:'',//品牌
						sugar_id:'',//品牌
						sugar_amount:"",//数量
						sugar_price:"",//金额
						sugar_remark:"",//备注
						sugerIndex:''
					}
				], // 喜糖
				dessert: [
					{   
						dessert_id:'',
						dessert_text:'',
						dessert_amount:"",//数量
						dessert_price:"",//金额
						dessert_remark:"",//备注
						dessertIndex:''
					}
				], // 糕点
				light: [
					{   
						light_id:'',
						light_text:'',
						light_amount:"",//数量
						light_price:"",//金额
						light_remark:"",//备注
						lightIndex:''
					}
				], // 灯光
				led: [
					{   
						led_id:'',
						led_text:'',
						led_amount:"",//数量
						led_price:"",//金额
						led_remark:"",//备注
						ledIndex:''
					}
				], // led
				d3: [
					{   
						d3_id:'',
						d3_text:'',
						d3_amount:"",//数量
						d3_price:"",//金额
						d3_remark:"",//备注
						threeIndex:''
					}
				], // 3d
				sugarList:'',//喜糖
				carList:'',//婚车
				wineList:'',//酒水				
				dessertList:'',//糕点
				lightList:'',//灯光
				ledList:'',//Led
				d3List:'',//3d
				contractPrice:'',//
				banquet_incomeList:{//收款				   
					banquet_income_category:'',
					banquet_income_payment:'',
					banquet_income_type:'',
					banquet_income_type_text:'',
					banquet_income_item_price:'',
					banquet_income_date:'',
					receivable_no:'',
					// banquet_income_date
					banquet_income_real_date:'',
					income_remark:"",
					banquet_income_payment_text:'',									  		
				},
				paymentList:{//付款
				    pay_category:'',
				    pay_type:'',
					pay_type_text:'',
				    apply_pay_date:'',
				    pay_real_date:'',
				    payment_remark:'',
					payment_no:'',
					pay_to_company:'',//收款酒店
					pay_to_account:'',//收款账号
					pay_to_bank:'',//收款银行
				},
				banquetSuborderList:{//婚宴
					table_amount:'',
					table_price:'',
					banquet_totals:'',					
					sub_banquet_remark:'',	
					company_id:'',
					company_text:''
				},
				
				weddingSuborderList:{//婚庆
					wedding_order_no:'',
					wedding_totals:'',
					sub_wedding_remark:'',
					company_id:'',
					company_text:''
				},
				banquet:{
					banquet_totals:"",//婚宴总金额
				    table_amount:"",//桌数
				    table_price:"",//餐标
				    service_fee:"",//服务费总计
				    wine_fee:"",//酒水费用
				    banquet_update_table:"",//加菜换菜
				    banquet_ritual_hall:"",//仪式价格
				    banquet_other:"",//其他
				    banquet_remark:"",//备注
					ritual_text:'',
					ritual_id:'',
					
				}, // 婚宴
				Banquet_companyIndex:'',
				comboIndex:'',//套餐
				ceremonyIndex:'',//仪式
				researchIndex:'',//是否研发产品
				wedding_companyIndex:'',
				wedding: {
					  wedding_total:'',
					  wedding_package_price:"",//婚庆套餐价
					  wedding_ritual_hall:"",//仪式价格
					  wedding_other:"",//其他
					  new_product_no:"",//研发产品编号
					  wedding_remark:"",//备注
				}, // 婚庆
				
				confirmList:'',//审核流程
				isEdit:'',//是否可以编辑
				pickerList:[],//picker
				isMianCar:[{id:0,title:"否"},{id:1,title:"是"}],//是否是主车
				
				companyList:[],//签约公司
				cooperationModeList:[],//合作模式
				newsTypeList:[],//婚宴信息
				
				payTypeList:[],//性质
				incomePaymentList:[[],[]],//收款方式
				incomeTypeList:[],//收款性质
				
				imageArray:[],//合同图片
				receipt_imgArray:[],//收据图片
				note_img_imgArray:[],//小票
			}
		},
		onLoad(options) {	
			
			this.options = JSON.parse(options.type) ;			
			this.getData( this.options)
					
		},
		methods: {
			getData(e){				
			  let that=this										
			  sun.request({
				url: e.read,
				showLoading: true,
				token:true,
				data:{
					order_id:e.order_id
				},
				success(res) {				
					if(res.code==200){			
					  	that.incomePaymentList=res.data.incomePaymentList?res.data.incomePaymentList:'';
						that.incomeTypeList = res.data.incomeTypeList?res.data.incomeTypeList:'';
					    that.companyList = res.data.companyList?res.data.companyList:'';
						that.confirmList=res.data.confirmList?res.data.confirmList:'';
					}
				},
				fail(e) {
					uni.showToast({
						icon: "none",
						title: "服务器开小差去啦~",
					})
				}
			  })
						  
			},
			//获取筛选
			getSearch(e){
			  let that=this										
			  sun.request({
				url: e.picker,
				showLoading: true,
				token:true,
				data:{
					
				},
				success(res) {				
					if(res.code==200){
			          that.pickerList=res.data.pickerList					  
					}
				},
				fail(e) {
					uni.showToast({
						icon: "none",
						title: "服务器开小差去啦~",
					})
				}
			  })
						  
			},
			//审核流程
			flowData(e){
			  let that=this										
			  sun.request({
				url: "/h5/order.confirm/getConfirmStep",
				showLoading: true,
				token:true,
				data:{
					id:e.id
				},
				success(res) {				
					if(res.code==200){						
					  that.confirmList = res.data.confirmList;
					  that.isEdit = res.data.isEdit;
					}
				},
				fail(e) {
					uni.showToast({
						icon: "none",
						title: "服务器开小差去啦~",
					})
				}
			  })
						  
			},
			//右侧修改
			editTextFn(e){
			},
			//保存提交
			saveFn(){
				
				let that=this
				sun.request({
					url: that.options.api,
					showLoading: true,
					token:true,
					data:{
						order_id:that.options.order_id,
						banquet_incomeList:that.banquet_incomeList?JSON.stringify(that.banquet_incomeList):'',
						paymentList:that.paymentList?JSON.stringify(that.paymentList):'',
						banquetSuborderList:that.banquetSuborderList?JSON.stringify(that.banquetSuborderList):'',
						weddingSuborderList:that.weddingSuborderList?JSON.stringify(that.weddingSuborderList):'',
						contract_img:that.imageArray?that.imageArray:'',//合同图片
						receipt_img:that.receipt_imgArray?that.receipt_imgArray:'',//收据图片
						note_img:that.note_img_imgArray?that.note_img_imgArray:'',//小票
					},
					success(res) {				
						if(res.code==200){						
						  uni.showToast({
						  	icon:"none",
							title:res.msg
						  })						
						  uni.navigateBack({
						  	delta:1,
							
						  })
						  // un.navigateTo({})
						}else{
							uni.showToast({
								icon:"none",
								title:res.msg
							})
						}
					},
					fail(e) {
						uni.showToast({
							icon: "none",
							title: "服务器开小差去啦~",
						})
					}
				})
			},
			// 婚车
				changeCar(e){
					let index =e.detail.value;
					this.carList.is_master = index					
				},
				bindTimeChange(e){
				
					let type = e.currentTarget.dataset.type;
					let index =e.detail.value			
					let that=this
					switch(type) {
						case 'carList':
							that.carList.car_id =that.pickerList[index].id
							that.carList.title =that.pickerList[index].title
							break;
						case 'wineList':
							that.wineList.wine_id =that.pickerList[index].id
							that.wineList.title =that.pickerList[index].title
							break;
						case 'sugarList':
							that.sugarList.sugar_id =that.pickerList[index].id
							that.sugarList.title =that.pickerList[index].title
							break;
						case 'dessertList':
							that.dessertList.dessert_id =that.pickerList[index].id
							that.dessertList.title =that.pickerList[index].title
							break;
						case 'lightList':
							that.lightList.light_id =that.pickerList[index].id
							that.lightList.title =that.pickerList[index].title
							break;
						case 'ledList':
							that.ledList.led_id =that.pickerList[index].id
							that.ledList.title =that.pickerList[index].title
							break;
						case 'd3List':
							that.d3List.d3_id =that.pickerList[index].id;
							that.d3List.title =that.pickerList[index].title;
							break;
										
						default :
					}
					
				
				},
				btnConfirm(e){				
					this.order.sign_date = e.key
				},
				bindDateChange(e){
					this.order.event_date = e.detail.value;				
				},
				//定金时间选择
				contractBtnConfirm(e){		
					this.contractPrice.earnest_money_date = e.ymd;
				},
				//中款
				middleBtnConfirm(e){
					this.contractPrice.middle_money_date = e.ymd;
				},
				//尾款时间
				tail_moneyBtnConfirm(e){
					this.contractPrice.tail_money_date = e.ymd;
				},
				// 收款
				income_date_moneyBtnConfirm(e){
					
					this.banquet_incomeList.banquet_income_date = e.ymd;
				},
				income_real_date_moneyBtnConfirm(e){
					this.banquet_incomeList.banquet_income_real_date = e.ymd;
				},
				//签约公司
				companyListFn(e){
					this.order.company_id = this.companyList[e.detail.value].id;
					this.order.company_title = this.companyList[e.detail.value].title
				},
				//订单类型
				newsTypeListFn(e){				
				   this.order.news_type=e.detail.value;
				},
				// 合作模式e
				cooperationModeListFn(e){
					this.order.cooperation_mode = e.detail.value;
				},
				//收款类目
				income_categoryFn(e){
					let index=e.detail.value
					this.incomeList.income_category= this.incomePaymentList[index].title;				
				},
				//收款方式
				incomePaymentListFn(e){					
					let arrayIndex=e.currentTarget.dataset.type
					let index=e.detail.value
				    this.banquet_incomeList.banquet_income_payment_text= this.incomePaymentList[index].title;
					this.banquet_incomeList.banquet_income_payment= this.incomePaymentList[index].id;
				},
				//收款性质
				income_type_textFn(e){
					let index=e.detail.value;
					this.banquet_incomeList.banquet_income_type_text= this.incomeTypeList[index].title;
					this.banquet_incomeList.banquet_income_type= this.incomeTypeList[index].id;
				},
				//付款性质
				payTypeListFn(e){
					let index=e.detail.value;
					this.paymentList.pay_type_text= this.incomeTypeList[index].title;
					this.paymentList.pay_type= this.incomeTypeList[index].id;
				},
				apply_pay_dateFn(e){
					this.paymentList.apply_pay_date=e.ymd
				},
				pay_real_dateFn(e){
					this.paymentList.pay_real_date=e.ymd
				},
				//选择图片
				 chooseImage(e) {				 
					 let _this =this;
					 uni.chooseImage({
					     count: 1, //默认9
					     sizeType: ['compressed'], //可以指定是原图还是压缩图，默认二者都有				     
					     success: function (res) {
					        _this.upImg(res.tempFiles,e)
					     }
					 });
					
				},
				//上传图片
				upImg(data,e){				
					let _this = this;
					uni.showLoading({title:'上传中',mask:true});
					var i = data.i ? data.i : 0;//当前上传的哪张图片
					var success = data.success ? data.success : 0;//上传成功的个数
					var fail = data.fail ? data.fail : 0;//上传失败的个数
					uni.uploadFile({
						url:sun.http+"/h5/order.upload/doupload",													
						filePath:data[i].path,
						header:{
							
						},
						name:'file',
						formData:{
							token:uni.getStorageSync("token")?uni.getStorageSync("token"):''
						},
						success: (res) =>{
							if (JSON.parse(res.data).msg == "上传成功"){
								success++;//图片上传成功，图片上传成功的变量+1
								uni.hideLoading()
							}								
							if(e=='imageArray'){
							   _this.imageArray.push(JSON.parse(res.data).data.url)	
							}
							if(e == "receipt_imgArray"){
								_this.receipt_imgArray.push(JSON.parse(res.data).data.url)							
							}
								
							if(e == "note_img_imgArray"){
								_this.note_img_imgArray.push(JSON.parse(res.data).data.url)							
							}
						},
						fail:()=>{
						 fail++;//图片上传失败，图片上传失败的变量+1
						},
						complete: () => {
							i++;//这个图片执行完上传后，开始上传下一张
							if (i == data.length) {   //当图片传完时，停止调用          
								uni.showToast({
									icon:'none',
									title: '成功：' + success + " 失败：" + fail,
								})
							} else {//若图片还没有传完，则继续调用函数
								data.i = i;
								data.success = success;
								data.fail = fail;
								_this.upImg(data,e);
							}
			
						}		
					})
				},
				//删除图片
				deleteImageArray(index,e){
					if(e=='imageArray'){
					    this.imageArray.splice(index,1)				   
					}
					if(e == "receipt_imgArray"){
						this.receipt_imgArray.splice(index,1)				   
					}
						
					if(e == "note_img_imgArray"){
						this.note_img_imgArray.splice(index,1)				   					
					}
				},
				//婚宴增项承办公司
				banquetCompanyListe(e){					
					let type=e.currentTarget.dataset.type
					let value =e.detail.value
				   this.banquetSuborderList.company_id = this.companyList[value].id;					
				   this.banquetSuborderList.company_text = this.companyList[value].title;
				   this.getConfirmSequence({id:this.companyList[value].id,type:type})
				},				
				//婚宴增项承办公司
				weddingCompanyListe(e){
					let type=e.currentTarget.dataset.type
					let value =e.detail.value					
				   this.weddingSuborderList.company_id = this.companyList[value].id;					
				   this.weddingSuborderList.company_text = this.companyList[value].title;
				   this.getConfirmSequence({id:this.companyList[value].id,type:type})
				},
				//获取审核流程
				getConfirmSequence(e){
					let that=this
					sun.request({
						url: '/h5/order.confirm/getConfirmSequence',
						showLoading: true,
						token:true,
						data:{							
							company_id:e.id,
							type:e.type?e.type:''
						},
						success(res) {				
							if(res.code==200){						
							   that.confirmList = res.data.confirmList
							}
						},
						fail(e) {
							uni.showToast({
								icon: "none",
								title: "服务器开小差去啦~",
							})
						}
					})
				},
				//婚宴 所属公司
				chooseBanquet(e){
					this.Banquet_companyIndex=e.target.value
					this.banquet.company_id = this.companyList[this.Banquet_companyIndex].id;
					this.banquet.company_title = this.companyList[this.Banquet_companyIndex].title;				
				},
				//婚庆 所属公司
				chooseWedding(e){
					this.wedding_companyIndex=e.target.value
					this.wedding.company_id = this.companyList[this.wedding_companyIndex].id;
					this.wedding.company_title = this.companyList[this.wedding_companyIndex].title;				
				},
			}
	}
</script>

<style lang="less">
page{
	background: #F4F4F4;
	padding-bottom: 200upx;
}
.infoBox{
	width: 100%;
	height: auto;
	background: #F1F1F1;
	margin-top: 20upx;
}
.infoBox .title{
	background: #FFFFFF;
}
.info_box{
	width: 100%;
	height: auto;
	background: #FFFFFF;
	padding: 20upx 30upx 40upx 30upx;
	box-sizing: border-box;
	border-top:1upx solid #eeeeee;
	.name{
		width: 100%;
		height: 52upx;
		display: flex;
		align-items: center;
		font-size: 26upx;
		color: #666666;
	}
	.con{
		width: 100%;
		height: 52upx;
		display: flex;
		justify-content: space-between;
		align-items: center;
		font-size: 26upx;
		position: relative;		
		input{
			width: 200upx;
			font-size: 28upx;
		}
		.txt1{
			width: auto;
			height: 100%;
			display: block;
			line-height: 52upx;
			color: #999999;
			float: left;
		}
		.txt2{
			width: auto;
			height: 100%;
			display: block;
			line-height: 52upx;
			color: #666666;
			position: absolute;
			right: 0;
		}
	}
	.remark{
		width: 100%;
		height: auto;
		font-size: 26upx;
		margin-top: 20upx;
		.txt1{
			width: 100%;
			height: 40upx;
			color: #999999;
			line-height: 40upx;
		}
		.txt2{
			width: 100%;
			height: 200upx;
			line-height: 32upx;
			padding-top:10upx;
			box-sizing: border-box;
			font-size: 26upx;
			color: #666666;
			word-break: break-all;  /* break-all(允许在单词内换行。) */
		    text-overflow: ellipsis;  /* 超出部分省略号 */
			display: -webkit-box; /** 对象作为伸缩盒子模型显示 **/
			-webkit-box-orient: vertical; /** 设置或检索伸缩盒对象的子元素的排列方式 **/
			-webkit-line-clamp: 2; /** 显示的行数 **/
			overflow: hidden;
		}
	}
}


.photo{
	width: 100%;
	height: auto;
    padding: 32upx 44upx;
	text{
		width: 100%;
		height: 29upx;
		display: block;
		font-size: 30upx;
		color: #333333;
		margin-bottom: 25upx;
	}
	.addPic{
		position: relative;
		overflow: hidden;
		width: 88upx;
		height: 88upx;
		border: 1px solid #CCCCCC;
		margin-left: 10upx;
		image{
			width: 88upx;
			height: 88upx;
			margin-right: 37upx;
		}
	}
}




///审批流程
.approval{
	width: 100%;
	height: auto;
	text{
		width: 100%;
		height: 28upx;
		display: block;
		font-size:30upx;
		color: #999999;
		margin-bottom: 50upx;
		padding: 32upx 44upx 0 44upx;
		box-sizing: border-box;
	}
	}
.approver{
	width: 100%;
	height: auto;
	.box{
		width: 100%;
		height: 158upx;
		border-bottom: 1upx solid #eeeeee;
		box-sizing: border-box;
		padding: 0 32upx;
		position: relative;
		.circle{
			width: 25upx;
			height: 25upx;
			background: #D3D3D3;
			border-radius: 50%;
			position: absolute;
			left: 30upx;
			top: 70upx;
		}
		.left{
			  width: 350upx;
			  min-height: 100upx;
			  white-space:normal ;
			  font-size: 32upx;
			  color: #333333;
			  margin-left: 57upx;
			  float: left;
			  
			  .view_text{
				  width: auto;
				  height: auto;
				  display: block;
				  font-size: 26upx;
				  color: #999999;
				  padding: 0;
				  word-break: break-all;
				  text-overflow: ellipsis;
				  display: -webkit-box; /** 将对象作为伸缩盒子模型显示 **/
				  -webkit-box-orient: vertical; /** 设置或检索伸缩盒对象的子元素的排列方式 **/
				  -webkit-line-clamp: 2; /** 显示的行数 **/
				  overflow: hidden;  /** 隐藏超出的内容 **/				  			
			  }
			}
		.right{
			width: auto;
			height: 110upx;
            float: right;
			padding-top: 30upx;
			margin-right:10upx ;
			display: flex;
			flex-direction: column;
			justify-content: center;
			align-items: center;			
			.image{
				width: 71upx;
				height: 71upx;
				background:#D3D3D3;
				border-radius: 50%;
			}
			text{
				
				height: auto;
				display: block;
                font-size: 26upx;
				color: #999999;
				padding: 0;
				text-align: center;
			}
		}
	}
}

.frist_circle{
	width: 25upx;
	height: 25upx;
	background: #D3D3D3;
	border-radius: 50%;
	position: absolute;
	left: 30upx;
	top: 70upx;
}
.circle::after{
	content: '';
	width: 2upx;
	height: 135upx;
	display: block;
	background: #D3D3D3;
	position: absolute;
	left: 50%;
	bottom: 25upx;
}


.btn{
	width: 100%;
	background: #007AFF;
	border-radius: 30upx;
	border: none;
	color: #FFFFFF;
	position: fixed;
	left: 0;
	bottom: 50upx;
}



.hotelService{
		width: 100%;
		height: auto;
		.title{
			width: 100%;
			height: 73upx;
			padding: 0 33upx;
			font-size:24upx;
			background:#F6F6F6;
			line-height: 73upx;
			.name{
				width: auto;
				display: block;
				float: left;
			}
			.delete{
				width: 100upx;
				display: block;
				float: right;
				color: #406CEB;
			}
		}
		.content{
			width: 100%;
			height: auto;
            .box{
				width: 100%;
				height: 88upx;
				line-height: 88upx;
				padding: 0 32upx;
				box-sizing: border-box;
				border-bottom: 1upx solid #EEEEEE;
				font-size: 30upx;
				color: #333333;
				text{
					width: auto;
					float: left;
					color: #333333;
				}
				input{
					width: 50%;
					height: 100%;
					line-height: 88upx;
					float: right;
					text-align: right;
					color: #333333;
				}
				.choose{
					width: auto;
					height: 100%;
					display: flex;
					align-items: center;
				    float: right;
					margin-right: 30upx;
				    text{
						width: auto;
						height: 40upx;
						line-height: 40upx;
						font-size: 30upx;
						color: #999999;
						margin-right:20upx ;
					}
					image{
						width: 40upx;
						height: 40upx;
					}
				}
			}
			.remark{
				width: 100%;
				min-height: 154upx;
				padding: 36upx 32upx 0 32upx;
				box-sizing: border-box;
				margin-bottom: 24upx;
				text{
					width: 60upx;
					height: 112upx;
					font-size: 30upx;
					color: #333333;
					float: left;
				}
				textarea{
					width: 560upx !important;
					height: 112upx;
					display: block;
					font-size: 28upx;
					color: #999999;
					float: right;
				}
				}
		}
		.addDetail{
			width: 100%;
			height: 88upx;
			color: #406CEB;
			font-size: 30upx;
			line-height: 88upx;
			text-align: center;
			border-top: 1upx solid #eeeeee;
		}
	}
</style>
